<!doctype html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<title>发布需求-传感云平台</title>
<meta content="" name="Keywords">
<meta content="" name="Description">
<meta name="format-detection" content="telephone=no">
<link href="/flow-ui/favicon.ico" rel="icon">
<link href="/flow-ui/css/style.css" rel="stylesheet">
<!--[if lt IE 9]><script src="/flow-ui/lib/H5shiv.js"></script><![endif]-->

<!-- 富文本编辑器 kindeditor -->
<link href="/flow-ui/lib/kindeditor/themes/default/default.css" rel="stylesheet" />
<script src="/flow-ui/lib/kindeditor/kindeditor-all-min.js"></script>
<script src="/flow-ui/lib/kindeditor/init.js"></script>
<!-- 富文本编辑器 kindeditor end -->
</head>
<body>
<!-- pageHeader -->
<header class="pageHeader">
  <div class="head1">
    <div class="wrap fix flex-row">
      <h1 class="logo flex-1 flex-row align-center">
        <a href="/" title="传感云平台">
          <img src="/flow-ui/img/logo.png" alt="传感云平台">
          <span class="text">传感云平台</span>
        </a>
      </h1>
      <div class="btns flex-row align-center">
        <a href="#" class="hBtn"><i class="ico"></i>发布需求</a>
        <a href="#" class="hBtn"><i class="ico ico1_2"></i>发布成果</a>
      </div>
      <div class="flex-row align-center">
        <div class="headSearch flex-1 flex-row">
          <div class="select">
            <div class="selected">全部</div>
            <input type="hidden" name="selected" value="0">
            <div class="options">
              <ul>
                <li class="option" data-val="0">全部</li>
                <li class="option" data-val="1">需求</li>
                <li class="option" data-val="2">成果</li>
              </ul>
            </div>
          </div>
          <div class="sel_form flex-1 flex-row">
            <div class="_inp flex-1"><input type="text" placeholder="输入关键词"></div>
            <div class="_btn"><button type="button">搜索</button></div>
          </div>
        </div>
      </div>
      <div class="mobile_menu flex-row align-center">
        <a href="#menu" class="mobile_key">导航</a>
      </div>
    </div>
  </div>
  <div class="head2">
    <div class="wrap fix flex-row">
      <nav class="pageNav flex-1" id="menu">
        <ul>
          <li><a href="/">首页</a></li>
          <li class="active"><a href="needs.html">需求大厅</a></li>
          <li><a href="result.html">成果展示</a></li>
          <li><a href="product_union.html">产业联盟</a></li>
          <li><a href="expert_lib.html">专家库</a></li>
          <li><a href="special.html">大赛专题</a></li>
          <li><a href="about.html">平台简介</a></li>
          <li><a href="#">微纳大赛</a></li>
        </ul>
      </nav>
      <div class="account flex-row align-center">
        <!-- 登录前 -->
        <div class="login_before">
          <a class="btn btn-ghost btn-primary goLogin">登录</a>
          <a class="btn btn-ghost btn-primary goRegist">注册</a>

          <!--登录表单-->
          <form class="loginForm hide" id="login_form">
            <div class="form-group">
              <input type="text" class="form-control mobile" placeholder="用户名/手机号" datatype="*" nullmsg="请输入用户名/手机号！">
            </div>
            <div class="form-group">
              <input type="password" class="form-control password" placeholder="密码" datatype="*" nullmsg="请输入密码！">
            </div>
            <div class="form-group">
              <button type="submit" class="btn btn-block btn-primary">登录</button>
            </div>
            <div class="text tc">还没有账号，<a class="colorLink goRegist">立即注册</a></div>
          </form>
          <!--登录表单 end-->
          <!--注册表单-->
          <form class="registForm hide" id="reg_form">
            <div class="form-group">
              <input type="text" name="username" class="form-control" placeholder="用户名" datatype="*" nullmsg="请输入用户名！">
            </div>
            <div class="form-group">
              <input type="text" name="mobile" class="form-control reg_mobile" placeholder="手机号" datatype="m" nullmsg="请输入手机号！" errormsg="手机号码格式错误！">
            </div>
            <div class="form-group">
              <input type="text" name="code" class="form-control" placeholder="验证码" datatype="*" nullmsg="请输入验证码！">
              <a class="codeBtn colorLink" id="codeBtn">发送验证码</a>
            </div>
            <div class="form-group">
              <input type="password" name="userpassword" class="form-control" placeholder="密码" datatype="*6-15" nullmsg="请输入密码！" errormsg="密码范围在6~15位之间！" plugin="passwordStrength">
            </div>
            <div class="form-group">
              <input type="password" name="userpassword2" class="form-control" placeholder="确认密码" datatype="*" nullmsg="请再次输入密码！" recheck="userpassword" errormsg="您两次输入的密码不一致！">
            </div>
            <div class="form-group">
              <label class="checkbox"><input type="checkbox" name="agree" datatype="*" nullmsg="请阅读并同意用户协议">我已阅读并同意<a href="#" class="colorLink">《平台协议》</a></label>
            </div>
            <div class="form-group">
              <button type="submit" class="btn btn-block btn-primary">注册</button>
            </div>
          </form>
          <!--注册表单 end-->
        </div>
        <!-- 登录前 end -->
        <!-- 登录后 -->
        <div class="login_after flex-row" style="display:none;">
          <div class="welcome el">欢迎，admin</div>
          <a class="btn btn-ghost btn-primary logout">退出</a>
        </div>
        <!-- 登录后 end -->
      </div>
    </div>
  </div>
</header>
<!-- pageHeader end -->
<!-- pageMain -->
<section class="pageMain">
  <div class="wrap fix">
    <div class="formMain">
      <div class="hd">发布需求</div>
      <div class="bd whitebg">
        <form class="publishForm" id="publishForm">
          <div class="row">
            <div class="span-12">
              <div class="form-group">
                <label class="control-label"><strong class="require">*</strong>需求名称：</label>
                <input type="text" class="form-control" name="" datatype="*" nullmsg="请输入需求名称！">
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label"><strong class="require">*</strong>所属领域：</label>
                <select name="" class="form-control" datatype="*" nullmsg="请选择所属领域！">
                  <option value="">请选择</option>
                  <option value="1">领域1</option>
                </select>
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label"><strong class="require">*</strong>需求性质：</label>
                <select name="" class="form-control" datatype="*" nullmsg="请选择需求性质！">
                  <option value="">请选择</option>
                  <option value="1">性质1</option>
                </select>
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label"><strong class="require">*</strong>需求缘由：</label>
                <select name="" class="form-control" datatype="*" nullmsg="请选择需求缘由！">
                  <option value="">请选择</option>
                  <option value="1">缘由1</option>
                </select>
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label"><strong class="require">*</strong>意向获得方式：</label>
                <select name="" class="form-control" datatype="*" nullmsg="请选择意向获得方式！">
                  <option value="">请选择</option>
                  <option value="1">意向获得方式1</option>
                </select>
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label"><strong class="require">*</strong>意向合作单位：</label>
                <select name="" class="form-control" datatype="*" nullmsg="请选择意向合作单位！">
                  <option value="">请选择</option>
                  <option value="1">意向合作单位1</option>
                </select>
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label"><strong class="require">*</strong>需求期限：</label>
                <select name="" class="form-control" datatype="*" nullmsg="请选择需求期限！">
                  <option value="">请选择</option>
                  <option value="1">需求期限1</option>
                </select>
              </div>
            </div>
            <div class="span-12 editorBox">
              <div class="form-group">
                <label class="control-label"><strong class="require">*</strong>需求描述：</label>
                
                <textarea id="kindeditor" name="content" rows="20" cols="100" style="width:100%; height:200px; visibility:hidden;" upload_url="http://www.baidu.com/">内容</textarea>

              </div>
            </div>
            <div class="span-12">
              <div class="form-group">
                <label class="control-label">上传附件：</label>
                <div class="_upload flex-row">
                  <div class="btn btn-ghost btn-primary uploadBtn" id="uploadFJ">点击上传</div>
                  <div class="tip">支持doc、pdf等格式，文件大小≤3M</div>
                </div>
                <ul class="upload_result" id="upload_result">
                  <li class="flex-row">
                    <div class="flex-1 el">需求文档.pdf</div>
                    <a class="delete" title="删除">删除</a>
                  </li>
                </ul>
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label">单位名称：</label>
                <input type="text" class="form-control" name="">
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label">单位地址：</label>
                <input type="text" class="form-control" name="">
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label">所属行业：</label>
                <select name="" class="form-control">
                  <option value="">请选择</option>
                  <option value="1">行业1</option>
                </select>
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label">主导产品：</label>
                <input type="text" class="form-control" name="">
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label">联系人：</label>
                <input type="text" class="form-control" name="">
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label">职务：</label>
                <input type="text" class="form-control" name="">
              </div>
            </div>
            <div class="span-6 smal-12">
              <div class="form-group">
                <label class="control-label">联系电话：</label>
                <input type="text" class="form-control" name="">
              </div>
            </div>
            <div class="span-12">
              <div class="form-group formBtns">
                <button type="submit" class="btn btn-primary">发布</button><a href="#" class="btn btn-default">取消</a>
                <!-- <button type="reset" class="btn btn-default">重置</button> -->
              </div>
            </div>

          </div>
          
        </form>
      </div>
    </div>
  </div>
</section>
<!-- pageMain end -->
<!-- pageFooter end -->
<footer class="pageFooter">
  <div class="wrap">
    <h2 class="logo">传感云平台</h2>
    <div class="quickLinks">
      <ul>
        <li><a href="#">首页</a></li>
        <li><a href="#">需求大厅</a></li>
        <li><a href="#">成果展示</a></li>
        <li><a href="#">产业联盟</a></li>
        <li><a href="#">专家库</a></li>
        <li><a href="#">大赛专题</a></li>
        <li><a href="#">平台简介</a></li>
        <li><a href="#">微纳大赛</a></li>
      </ul>
    </div>
    <div class="infos">
      <span class="dib copyRight">&copy;明石创新（烟台）微纳传感技术研究院有限公司版权所有</span>
      <span class="dib bei">鲁ICP备14032136号</span>
    </div>
  </div>
</footer>
<!-- pageFooter end -->
</body>
<script src="/flow-ui/lib/sea.js" id="seajsnode" domain=""></script>
<script>
  seajs.use('js/channel');
  define("page_use",function(require,exports,module) {
    var $ = require('jquery');
    var com = require('js/common');
    var base = require('base')

    initEditor('kindeditor');

    require('validform');
    var publishForm = $('#publishForm').Validform({
      ajaxPost:true,
      url: 'http://host.refined-x.com/test/ajax.php',
      beforeSubmit:function(form){
        console.log($(form),'form');
        //需要返回"true / false"决定表单是否提交
        return false
      },
      callback:function(res){
        
      }
    });

    //七牛上传
    var qiniu = require('js/qiniu_upload');
    //上传成功回调
    var upSuccess = function(file,response){
        var obj = response.data;
        if(response.status == 0){
            var img =  obj.fwq + '/' + obj.fjlj + obj.fwdmc;
            var _html = '<li class="_img" id="'+obj.fjid+'"><input type="hidden" name="img[]" value="'+obj.fjid+'" /><span class="img_dom"><img src="'+img+'" /></span><span class="_del" title="删除"><i class="ion">&#xe637;</i></span></li>';
            $('#zhizhao_list').append(_html);
        }else{
            ui.error(response.info);
        }
    };
    //上传
    qiniu.newAddUpload('uploadFJ','doc',false,upSuccess);

  });
  seajs.use("page_use");
</script>
</html>